package com.example.nfcaccesssystem;

import java.io.IOException;


public interface IModel {
	
	
	/**
	 * An asynchronous call to get Users
	 */
	public void getUsers();
	
	/**
	 * 
	 * @param name The name of the new user
	 * @param accessId the Access id of the new user
	 * @param doorArray The doors that the user shall have access to
	 */
	public void createUser(String name, String accessId, Door[] doorArray);
	
	/**
	 * 
	 * @param newDoorInfo The info of the new door
	 * @param userArray The users who shall have access
	 */
	public void createDoor(String newDoorInfo, User[] userArray);
	
	/**
	 * An asynchronous call to get Doors
	 */
	public void getDoors();

	/**
	 * Change the info of a door
	 * @param id The id of the door
	 * @param info The new Info
	 */
	public void changeDoorInfo(int id, String info);
	
	/**
	 * Change the name of a user
	 * @param id The id of the user
	 * @param info The new name
	 */
	public void changeUserName(int id, String name);
	
	/**
	 * Change the access id of a user
	 * @param id The id of the user
	 * @param info The new access id
	 */
	public void changeUserAccessId(int id, String accessId);
	
	/**
	 * An asynchronous call to get access information on this specific door
	 * @param d The door you want information obout
	 */
	public void getUsersAndAccess(Door d);
	
	/**
	 * An asynchronous call to get access information on this specific user
	 * @param d The user you want information obout
	 */
	public void getDoorsAndAccess(User u);

	/**
	 * 
	 * @param u The who shall have access to a specific door
	 * @param d The door
	 * @throws IOException
	 */
	public void addUserDoorAccess(User u, Door d);

	/**
	 * 
	 * @param u The who shall have removed his access to a specific door
	 * @param d The door
	 */
	public void removeUserDoorAccess(User u, Door d);

	/**
	 * Deletes a door
	 * @param id The id of the door you want to delete
	 */
	public void deleteDoor(int id);
	
	/**
	 * Deletes a user
	 * @param id The id of the user you want to delete
	 */
	public void deleteUser(int id);
}
